package com.itheima.Thread.getPriority线程优先级;

public class Demo {
    public static void main(String[] args) {
        //开启一条飞机线程
        Thread t1=new Thread(()->{
            for (int i = 0; i < 20; i++) {
                System.out.println("飞机....");
            }
        });
        //设置线程的优先级
        t1.setPriority(1);
        t1.start();

        //开启一条高铁线程
        Thread t2=new Thread(()->{
            for (int i = 0; i < 20; i++) {
                System.out.println("高铁....");
            }
        });
        //设置线程的优先级
        t2.setPriority(10);
        t2.start();





    }
}
